
<div id="contenedorJornadas">
<span class="vista">Novedades</span>
<br/>
<br/>
<div class="tabs">

  <div class="tabs_past">
    <div  class="tab_link selected">
    <a href="<?php echo url_for('@novedad_past') ?>"><b>Pasados</b></a>
    </div>
  </div>

   <div class="tabs_active">
    <div  class="tab_link ">
      <a href="javascript:void(0)"><b>Activos</b></a>
    </div>
  </div>

    <div id="borde">
     <?php echo image_tag('linea2.jpg','size=100%x2') ?>
    </div>
</div>

<br />
<?php if($pager->getNbResults()!=0){ ?>
  <?php foreach($pager->getResults() as $idx => $row){ ?>
    <?php if($idx>0){ ?><div style="width: 100%;"></div><br /><?php } ?>
    <div class="bloques-jornadas">

        <?php
            $date = $row->getCreatedAt();
            $year = substr($date,0,4);
            $month = substr($date,5,2);
             $day = substr($date,8,2);
             $fecha= $day.'/'.$month.'/'.$year;

                ?>

          <div class="titulo" >
            <a href="<?php echo url_for('@novedad_detail?id='.$row->getId()) ?>" ><?php echo html_entity_decode($row->getTitulo()); ?></a>
            <span class="fecha"><?php echo html_entity_decode($fecha); ?></span>
          </div>

        
          <div class="resumen" >
              <span><?php echo html_entity_decode($row->getBrevedescrip()); ?></span>

              <a href="<?php echo url_for('@novedad_detail?id='.$row->getId()) ?>"><span> <?php echo image_tag('icono.png','size=14x18') ?> &nbsp;&nbsp;&nbsp;ver novedad</span></a>
          </div>
    </div>
  <?php } ?>
<?php }else{ ?>
  No existen eventos activos
<?php } ?>
<br />
<?php if ($pager->haveToPaginate()): ?>
 
<div class="color_pag">

    <span> Paginas <?php echo $pagina  ?> de <?php  echo $max ?></span>
    <?php if($pager->getPreviousPage()!=$pager->getPage()){ ?>
    <div class="izq">
        <a href="?page=<?php echo $pager->getPreviousPage() ?>">
           <?php echo image_tag('btn_izq.png','size=14x14') ?></a>
    </div>
    <?php } ?>
    <?php foreach ($pager->getLinks() as $page): ?>
        <?php if ($page == $pager->getPage()): ?>
          <div class="imagen_pag" >
               <span><?php echo $page ?></span>
          </div>
        <?php else: ?>
          <div class="next" >
            <a href="?page=<?php echo $page ?>">
               <?php echo $page ?>
            </a>
          </div>

        <?php endif; ?>
    <?php endforeach; ?>
    <?php if($pager->getNextPage()!=$pager->getPage()){ ?>
      <div style="width: 30px;vertical-align: middle;display: inline-block;">
        <a href="?page=<?php echo $pager->getNextPage() ?>">
           <?php echo image_tag('btn_der.png','size=14x14') ?></a>
      </div>
    <?php } ?>
  </div>
<?php endif; ?>
</div>